package pt.iscte.pcd.santaclaus;

public class Main {

	static final int N_RENAS = 9;
	private static final int N_ELFOS = 7;
	

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		Porta porta = new Porta(3);
		Estabulo estabulo = new Estabulo();
		Cama cama = new Cama();
		Semaphore visita = new Semaphore(PaiNatal.N_ELFOS_AJUDA);
		
		PaiNatal paiNatal = new PaiNatal(porta, estabulo, cama, visita);
		paiNatal.start();
		
		for (int i = 0; i != N_RENAS; i++)
			new Rena(i, estabulo, cama).start();
		
		for (int i = 0; i != N_ELFOS; i++)
			new Elfo(i, porta, cama, visita).start();

	}

}
